<script setup lang="ts" name="editArticle">
import { onMounted } from 'vue'
import useEditArticle from '@/components/editData/hooks/editArticle'
const { articles, getArticlesData } = useEditArticle()

import ArticlesData from '@/components/editData/editArticlesData.vue'
import Null from '@/components/resultNull.vue'

onMounted(async () => {
  getArticlesData()
})
</script>

<template>
  <div id="editArticle">
    <component :is="articles.length !== 0 ? ArticlesData : Null" :articles="articles"></component>
  </div>
</template>

<style scoped lang="less">
#editArticle {
  margin-top: 10px;
}
</style>
